package com.example.entity;

public class Husband implements Person{
    private final String name;
    private final int age;
    private final Person wife;

    public Husband(String name, int age, Person wife) {
        this.name = name;
        this.age = age;
        this.wife = wife;
    }

    @Override
    public String toString() {
        return "Husband{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", wife=" + wife +
                '}';
    }
}
